package com.arpa.ntocc.common.service;

import com.arpa.ntocc.common.domain.entity.Party;
import com.arpa.ntocc.common.domain.entity.PartyResource;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Transactional;

/**
 * 资源关系Service
 * @author liuxr
 * @date 2021/11/15 9:27
 */
public interface IPartyResourceService extends IService<PartyResource> {


    /**
     * 删除资源关系
     * @author liuxr
     * @date 2021/11/15 10:08
     * @param partyCode 主体标识
     * @param groupCode 组织编码
     */
    @Transactional(rollbackFor = Exception.class)
    void removeByPartyCode(String partyCode,String groupCode);

    /**
     * 为组织管理员分配资源
     * @author liuxr
     * @date 2021/11/15 15:33
     * @param party
     */
    @Transactional(rollbackFor = Exception.class)
    void assignResourcesToOrganizationAdministrators(Party party);
}
